<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>姓：{{xing}}</p>
        <p>名：{{ming}}</p>
        <p>姓名：{{name}}</p>
        <input v-model="name">
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                xing:'',
                ming:'',
            },
            computed:{
                name:{
                    get:function(){
                        return this.xing+this.ming;
                    },
                    set:function(v){
                        var x = v.split('');
                        this.xing = x.shift();
                        this.ming = x.join('');
                    }
                }
            }
        })
    </script>
</body>
</html>